namespace GomuLibrary.IO
{
    using GomuLibrary.IO.DiscImage;
    using System;

    public class EntryInfo
    {
        private bool _isDirectory = false;
        private bool _isHidden = false;
        private DateTime _lastWrite;
        private string _path = string.Empty;

        public static explicit operator EntryInfo(RecordEntryInfo record) => 
            new EntryInfo { 
                _isDirectory = record.Directory,
                _isHidden = record.Hidden,
                _path = record.FullPath,
                _lastWrite = record.GetDate()
            };

        public bool IsDirectory =>
            this._isDirectory;

        public bool IsHidden =>
            this._isHidden;

        public DateTime LastWriteAccess =>
            this._lastWrite;

        public string Path =>
            this._path;
    }
}

